43 Lecture
CS402
Midterm & Final Term Short Notes
Decidablity
Decidability refers to the property of a problem or language being solvable by an algorithm or computer program. A decision problem is said to be decidable if there exists an algorithm that can correctly determine whether a given input belongs t
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
- Which of the following is an example of an undecidable problem?
a) Determining if a given number is prime
b) Sorting a list of integers in ascending order
c) Calculating the square root of a number
d) Counting the number of vowels in a string
Answer: a) Determining if a given number is prime
Which of the following problems is decidable?
a) The halting problem
b) The subset sum problem
c) The traveling salesman problem
d) The knapsack problem
Answer: b) The subset sum problem
Which of the following is a necessary condition for a problem to be decidable?
a) The problem must have a finite number of inputs
b) The problem must have a finite number of outputs
c) There must exist an algorithm that can solve the problem
d) The problem must be solvable in polynomial time
Answer: c) There must exist an algorithm that can solve the problem
Which of the following is a sufficient condition for a problem to be undecidable?
a) The problem can be solved by a non-deterministic algorithm
b) The problem can be solved in exponential time
c) The problem can be reduced to the halting problem
d) The problem has an infinite number of inputs
Answer: c) The problem can be reduced to the halting problem
Which of the following problems is undecidable?
a) Testing if a context-free grammar generates a given language
b) Finding the shortest path in a graph
c) Determining if a given number is even or odd
d) Calculating the sum of two integers
Answer: a) Testing if a context-free grammar generates a given language
Which of the following problems is semi-decidable?
a) The halting problem
b) The subset sum problem
c) The traveling salesman problem
d) The knapsack problem
Answer: a) The halting problem
Which of the following is true about semi-decidable problems?
a) They are always decidable
b) They are always undecidable
c) They can be partially solved by an algorithm
d) They cannot be solved by any algorithm
Answer: c) They can be partially solved by an algorithm
Which of the following is an example of a semi-decidable problem?
a) Testing if a given regular expression matches a given string
b) Sorting a list of integers in descending order
c) Finding the longest common subsequence between two strings
d) Checking if a given context-free grammar is ambiguous
Answer: a) Testing if a given regular expression matches a given string
Which of the following problems is not decidable in general, but is decidable for certain special cases?
a) The subset sum problem
b) The traveling salesman problem
c) The halting problem
d) The knapsack problem
Answer: b) The traveling salesman problem
Which of the following statements is true about undecidable problems?
a) They cannot be solved by any algorithm
b) They can be solved in exponential time
c) They have an infinite number of inputs
d) They are always semi-decidable
Answer: a) They cannot be solved by any algorithm
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
What is decidability? Answer: Decidability refers to the property of a problem or language being solvable by an algorithm or computer program. What is the difference between decidable and undecidable problems? Answer: A decidable problem is one that can be solved by an algorithm or computer program, while an undecidable problem is one that cannot be solved by any algorithm or computer program. What is the halting problem? Answer: The halting problem is a classic example of an undecidable problem that asks whether a given program will eventually halt or run forever. What is the Church-Turing thesis? Answer: The Church-Turing thesis states that any effectively computable function can be computed by a Turing machine or equivalent model of computation. Can all decision problems be solved by a computer program? Answer: No, not all decision problems can be solved by a computer program. Some problems are undecidable, which means that there is no algorithm that can solve them. What is the difference between decidable and semi-decidable problems? Answer: A decidable problem is one that can be solved by an algorithm, while a semi-decidable problem is one that can be partially solved by an algorithm. What is an example of a semi-decidable problem? Answer: The halting problem is an example of a semi-decidable problem. What is the significance of decidability in computer science? Answer: Decidability is an important concept in computer science as it helps us to understand the limits of what can and cannot be computed by an algorithm or computer program. Can a problem be undecidable in one model of computation but decidable in another? Answer: Yes, a problem can be undecidable in one model of computation but decidable in another. What is the relationship between the halting problem and the concept of decidability? Answer: The halting problem is an example of an undecidable problem, which demonstrates that not all problems can be solved by an algorithm or computer program, and hence, not all problems are decidable.